#include "app_message.h"
#include "log/log.h"
#include <stdlib.h>
#include <string.h>

int main(int argc, char *argv[])
{
    // Test cases for app_message
    // ...
    char *json_str = "{\"conn_type\":1,\"id\":\"5858\",\"msg\":\"61626364\"}";

    char char_array[100];
    int char_array_len = app_message_jsonToChars(json_str, char_array, 100);

    log_debug("chars: %.*s, len: %d",char_array_len, char_array, char_array_len);

    char *json_str2 = app_message_charsToJson(char_array);

    log_debug("json: %s", json_str2);

    free(json_str2);

    return 0;
}